<template>
    <div>
        <div class="i-layout-page-header">
            <PageHeader title="基本信息" hidden-breadcrumb />
        </div>
        <Card :bordered="false" dis-hover class="ivu-mt i-table-no-border">
            <DescriptionList title="基本信息" :col="1">
                <Description term="用户名称：">{{data.nickName}}</Description>
                <Description term="电话：">{{data.phonenumber}}</Description>
                <Description term="邮箱：">{{data.email}}</Description>
                <Description term="所属部门：">{{data.dept.deptName}}
                </Description>
                <Description term="所属角色：">{{data.roles[0].roleName}}</Description>
                <Description term="居住地址：">{{data.address}}</Description>
            </DescriptionList>
            <Divider />
        </Card>
    </div>
</template>
<script>
    import SysUser from "@/api/SysUser";
    export default {
        data() {
            return {
                data: ''
            }
        },
        created() {
            this.getDtail();
        },
        methods: {
            getDtail() {
                SysUser.getUserInfoById({
                    userId: this.$route.query.userId
                })
                    .then(res => {
                        // 返回数据
                        this.data = res;
                    })
                    .catch(err => {
                        // 异常情况
                    })
            }
        }

    }
</script>
